package com.ucas.controller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ucas.model.User;
import com.ucas.service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping("/save")
	public void saveUser(User user,HttpServletRequest request,HttpServletResponse response) {
		user.setUserDetail("userDetail".getBytes());
		Map<String,Object> result = userService.saveUser(user);
	}
	@RequestMapping("/findAll")
	public void findAllUser(User user,HttpServletRequest request,HttpServletResponse response) {
		List<User> userList = userService.findAll();
	}
}
